<?php
/**
 * Created by PhpStorm.
 * User: Dark
 * Date: 2015/8/17
 * Time: 11:18
 */

namespace Admin\Model;


use Think\Model;

class GoodsTypeModel extends Model{
    /*
     * 获得下一级商品分类
     */
    public function findNextTypeLevel($typelevel) {
        return $this->where('belongto='.$typelevel)->order('id')->select();
    }

    /*
     * 通过分类名字检查是否存在分类
     */
    public function isExist($typename) {
        return $this->where('typename='.$typename)->select();
    }
}